package org.dromara.business.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.dromara.business.domain.Post;
import org.dromara.business.domain.bo.PostBo;
import org.dromara.business.domain.vo.PostVo;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;

import java.util.Collection;
import java.util.List;

/**
 * 评论Service接口
 *
 * @author Lion Li
 * @date 2025-03-20
 */
public interface PostService extends IService<Post> {

    /**
     * 查询评论
     */
    PostVo queryById(Long postId);

    /**
     * 查询评论列表
     */
    TableDataInfo<PostVo> queryPageList(PostBo bo, PageQuery pageQuery);

    /**
     * 查询评论列表
     */
    List<PostVo> queryList(PostBo bo);

    /**
     * 新增评论
     */
    Boolean insertByBo(PostBo bo);

    /**
     * 修改评论
     */
    Boolean updateByBo(PostBo bo);

    /**
     * 校验并批量删除评论信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
}
